cmake_minimum_required(VERSION 3.10)
project(lust VERSION 1.0)

# 设置C标准
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED True)

# 生成compile_commands.json供VSCode使用
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# 添加包含目录
include_directories(
    include
    mujs-1.3.7
)

# 添加链接目录
link_directories(
    lib
)

# 指定源文件
set(SOURCES
    lust2d.c
)

# 创建可执行文件
add_executable(lust ${SOURCES})

# 静态链接raylib库
target_link_libraries(lust
    -static  # 启用静态链接
    raylib   # 链接raylib库
)

# 平台特定的静态链接设置
## if(WIN32)
##     target_link_libraries(lust gdi32 opengl32)
## elseif(APPLE)
##     target_link_libraries(lust "-framework OpenGL" "-framework Cocoa" "-framework IOKit" "-framework CoreVideo")
## else()
##     target_link_libraries(lust m GL X11 pthread dl rt Xrandr)
## endif()
